package com.suke.czx.modules.incentive.entity;

import com.suke.czx.common.validate.*;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 应用模块名称: 绩效
 * 代码描述: 绩效生成BO
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2022/07/27 20:37
 */
@Data
public class IncentiveGenerateBo {

    /**
     * 项目id
     */
    @NotNull(groups = {IncentiveEvaluationSearchGroup.class, IncentiveEvaluateGroup.class, IncentiveGenerateGroup.class, IncentiveInitialGroup.class}, message = "项目id不能为空")
    private Long projectId;

    /**
     * 绩效参数年份
     */
    @NotBlank(groups = {IncentiveEvaluationSearchGroup.class, IncentiveEvaluateGroup.class, IncentiveGenerateGroup.class}, message = "年份不能为空")
    private String year;

    /**
     * 绩效参数版本
     */
    @NotNull(groups = {IncentiveEvaluationSearchGroup.class, IncentiveEvaluateGroup.class, IncentiveGenerateGroup.class}, message = "绩效参数版本不能为空")
    private Integer version;

    /**
     * 组别
     */
    @NotNull(groups = {IncentiveEvaluateGroup.class}, message = "组别不能为空")
    @EnumValue(groups = {IncentiveEvaluateGroup.class}, intValues = {3, 4, 5, 6, 7, 8}, message = "岗位二类只能是3,4,5,6,7,8")
    private Integer job2;

    /**
     * 考核参数1
     */
    @Max(value = 1L, message = "考核参数不能超过100%")
    private BigDecimal evaluation1;

    /**
     * 考核参数2
     */
    @Max(value = 1L, message = "考核参数不能超过100%")
    private BigDecimal evaluation2;

    /**
     * 考核参数3
     */
    @Max(value = 1L, message = "考核参数不能超过100%")
    private BigDecimal evaluation3;

    /**
     * 考核参数4
     */
    @Max(value = 1L, message = "考核参数不能超过100%")
    private BigDecimal evaluation4;

}
